package com.rem.spring.annotionTx.service;

import com.rem.spring.annotionTx.dao.EmpDao;
import com.rem.spring.entity.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Rem
 * @date 2023-03-06
 */
@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpDao empDao;

    @Override
    @Transactional
    public void updateEmpById(Emp emp) {
        empDao.updateEmpById(emp);
        int a = 1 / 0;
    }
}
